﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NetCMS.Content;

public partial class user_discussTopi_del : NetCMS.Web.UI.UserPage
{
    Discuss dis = new Discuss();
    protected void Page_Load(object sender, EventArgs e)
    {
        
        Response.CacheControl = "no-cache";
        if (!IsPostBack)
        {
            string ID = Request.QueryString["DtID"];
            int vote = dis.sel_getDiscuss(ID,5);
            if (vote == 0)
            {
                if (dis.del_userDiscuss(ID, 11) == 0 || dis.del_userDiscuss(ID,12) == 0)
                {
                    PageError("主题删除失败", "");
                }
                else
                {
                    PageRight("主题删除成功", "");
                }
            }
            else
            {
                if (dis.del_userDiscuss(ID, 11) == 0 || dis.del_userDiscuss(ID, 12) == 0 || dis.del_userDiscuss(ID,13) == 0)
                {
                    PageError("主题删除失败", "");
                }
                else
                {
                    PageRight("主题删除成功", "");
                }
            }
        } 
    }    
 }